package com.eleMall.entity;



import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ximen
 * @since 2024-03-10
 */
@TableName("goods")
@Data
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 价格
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 点击量
     */
    @TableField("click")
    private Integer click;

    /**
     * 图片url
     */
    @TableField("image")
    private String image;


    /**
     * 商品id
     */
    @TableId("id")
    private Long id;

    /**
     * 商品
     */
    @TableField("introduce")
    private String introduce;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 发布商品的用户名
     */
    @TableField("username")
    private String username;

    /**
     * 分类id
     */
    @TableField("sort_id")
    private int sortId;
}
